﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web.Http;

namespace SIG.Web
{
    public static class WebApiConfig
    {
        public static void Register(HttpConfiguration config)
        {
            config.MapHttpAttributeRoutes();

            config.SuppressDefaultHostAuthentication();
            config.Filters.Add(new HostAuthenticationFilter("Bearer"));

            config.Routes.MapHttpRoute(
                name: "DefaultApi",
                routeTemplate: "api/{controller}/{id}",
                defaults: new { id = RouteParameter.Optional }
            );

            //config.Routes.MapHttpRoute(
            //name: "AllCustomers",
            //routeTemplate: "customers",
            //defaults: new { controller = "Secret", action = "Get" }
            //);
        }
    }
}
